/*
 * @Author: tcosfish
 * @Date: 2022-07-21 09:21:02
 * @LastEditors: tcosfish
 * @LastEditTime: 2022-07-21 09:21:02
 * @FilePath: \loadFile\src\config\cors.config.ts
 */
import { Options } from "koa2-cors"

const cors_header: Options = {
  origin: "*",
  allowHeaders: ["content-type", "accept", "authorization", "x-request-with"],
  allowMethods: ["GET", "POST", "OPTIONS", "DELETE", "PUT"],
  maxAge: 10 * 1024 * 1024,
  exposeHeaders: ["Authorization"],
}

export default cors_header
